﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuestLib_TestCode
{
    public partial class Form1 : Form
    {

        List<MyQuestPlayer> _PlayerList = new List<MyQuestPlayer>();

        MyQuestPlayer _SelectPlayer;

        //EventManager _EventManager = new EventManager();

        

        public Form1()
        {
            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            for(uint i = 0;i < 10; ++i)
            {
                MyQuestPlayer player = new MyQuestPlayer(i,this);
                _PlayerList.Add(player);
                this.comboBox1.Items.Add(player);
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            _SelectPlayer = this.comboBox1.SelectedItem as MyQuestPlayer;

            propertyGrid1.SelectedObject = _SelectPlayer;
            
        }

        private void button1_Click(object sender, EventArgs e)
        {

            _SelectPlayer.Log("퀘스트추가");

            MyQuest q = new MyQuest();
            q._QuestPlayer = _SelectPlayer;

            //_SelectPlayer.GiveQuest
            _SelectPlayer.AddQuest(q);
        }

        private void button2_Click(object sender, EventArgs e)
        {

            _SelectPlayer.Log("클릭",15);


            
            _SelectPlayer.OnEvent((int)CONTYPE.NPC_CLICK, 15);

            //_SelectPlayer.OnRequest(QuestLib.REQUEST.CLICKNPC, MyQuest.OnNPCClick(_SelectPlayer,15));
        }

        private void button3_Click(object sender, EventArgs e)
        {
            //_SelectPlayer.OnRequest(QuestLib.REQUEST.CLICKNPC, MyQuest.OnNPCClick(_SelectPlayer,12));
        }

        private void button4_Click(object sender, EventArgs e)
        {
            //_SelectPlayer.OnRequest(QuestLib.REQUEST.CLICKNPC, MyQuest.OnNPCClick(_SelectPlayer,11));
        }
    }
}